# -*- coding: utf-8 -*-
import datetime
import time

from odoo import api, fields, models
import logging
_logger = logging.getLogger(__name__)


class Server(models.Model):
    _inherit = 'ir.actions.server'

    xml_combine = fields.Text(compute='_compute_xml_combine',
                              string='View Architecture')

    def _compute_xml_combine(self):
        _logger.info('_compute_xml_combine')
        for view in self:
            view.xml_combine = 'hao'
#         for view in self:
#             _id = view.model.replace('.', '_')
#             _model = view.model
#             _string = view.name
#             _report_type = 'qweb-pdf'
#             _name = view.name
#             _file = 'modul_name.template_id'
#             _print_report_name = view.print_report_name
#             view.xml_combine = """<?xml version="1.0" encoding="utf-8"?>
# <odoo>
#     <data>
#         <report
#             id="%s"
#             model="%s"
#             string="%s"
#             report_type="%s"
#             name="%s"
#             file="%s"
#             print_report_name="%s"
#         />
#     </data>
# </odoo>
#                                  """ % (_id, _model, _string, _report_type, _name, _file, _print_report_name)
